home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbchat1a
/
frmlogin.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-08-30
|
3KB
|
110 lines
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 4 'Fixed ToolWindow
Caption = "Login"
ClientHeight = 1890
ClientLeft = 2835
ClientTop = 3435
ClientWidth = 3750
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1116.674
ScaleMode = 0 'User
ScaleWidth = 3521.047
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.ComboBox Combo1
Height = 315
Left = 1290
TabIndex = 4
Text = "127.0.0.1"
Top = 960
Width = 2295
End
Begin VB.TextBox txtUserName
Height = 345
Left = 1290
TabIndex = 1
Text = "guest"
Top = 135
Width = 2325
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 375
Left = 495
TabIndex = 5
Top = 1440
Width = 1140
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 2100
TabIndex = 6
Top = 1440
Width = 1140
End
Begin VB.TextBox txtnick
Height = 345
IMEMode = 3 'DISABLE
Left = 1290
TabIndex = 3
Text = "g"
Top = 525
Width = 2325
End
Begin VB.Label Label1
Caption = "Server:"
Height = 255
Left = 120
TabIndex = 7
Top = 960
Width = 1095
End
Begin VB.Label lblLabels
Caption = "&User Name:"
Height = 270
Index = 0
Left = 105
TabIndex = 0
Top = 150
Width = 1080
End
Begin VB.Label lblLabels
Caption = "Nickname:"
Height = 270
Index = 1
Left = 105
TabIndex = 2
Top = 540
Width = 1080
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click()
Me.Hide
End Sub
Private Sub cmdOK_Click()
On Error GoTo coner
user.Name = txtUserName.Text
user.Nickname = txtnick.Text
user.ip = MDIForm1.sck.LocalIP
server = Combo1.Text
MDIForm1.sck.Connect Combo1.Text, 1000
MDIForm1.Caption = "MOSTAFA VB CHAT (USER " & user.Nickname & ")"
Unload Me
connected = True
Exit Sub
coner:
MsgBox "Connection with the server failed..." & Err.Description
End Sub